package com.customview.inputview;

import android.text.Editable;
import android.text.TextWatcher;

/**
 * Created by lkq on 2018/2/5.
 * 自定义textWatcher
 */

public abstract class CustomTextWatcher implements TextWatcher {

    public abstract void afterChanged(Editable s);

    public void beforeChanged(CharSequence s, int start, int count, int after) {

    }

    public void onChanged(CharSequence s, int start, int before, int count) {

    }

    @Override
    public void beforeTextChanged(CharSequence s, int start, int count, int after) {
        beforeChanged(s, start, count, after);
    }

    @Override
    public void onTextChanged(CharSequence s, int start, int before, int count) {
        onChanged(s, start, before, count);
    }

    @Override
    public void afterTextChanged(Editable s) {
        afterChanged(s);
    }
}
